<extend name="Public/base" />
<block name="main">
	<div class="container-fluid">
		<div class="row">
			<div class="col-lg-12">
				<h1 class="page-header">课时列表</h1>
			</div>
			<!-- /.col-lg-12 -->
		</div>

		<div class="row">
			<div class="col-lg-12">
				<div class="panel panel-default">
					<div class="panel-heading">
						{$info['cname']} <br/>开课时间：{$info['ctime']|date="Y-m-d",###}<br/>剩余课时：{$info['cnum']-$info['crest']}
					</div>
				</div>
				<div class="panel-body">
					<div class="row">
						<div class="col-lg-12">
							<!-- /.row -->
							<div class="row">
								<div class="col-lg-12">
									<div class="panel panel-default">
										<!--
										<div class="panel-heading">
											DataTables Advanced Tables
										</div>
										-->
										<!-- /.panel-heading -->
										<div class="panel-body">
											<div class="dataTable_wrapper">
												<table class="table table-striped table-bordered table-hover" id="dataTables-example">
													<thead>
														<tr>
															<th>时间</th>
															<th>状态</th>
															<th>操作</th>
														</tr>
													</thead>
													<tbody>
														<volist name="list" id="list">
														<tr class="gradeC">
															<td>
																{$list['ltime']|date="Y-m-d",###}
																星期{$list['ltime']|week}
															</td>
															<td><span style="color:#666;">已完成</span></td>
															<td>
																<a href="{:U('Record/index',array('id'=>$list['lcid'],'time'=>$list['ltime']))}">上课记录</a>
															</td>
														</tr>
														</volist>
														<volist name="lesson" id="lesson">
														<tr class="gradeC">
															<td>
																{$lesson|date="Y-m-d",###}
																星期{$lesson|week}
															</td>
															<td><if condition="$lesson eq $daytime"><span style="color:red;">今天开课</span><else/><span style="color:green">尚未开课</span></if></td>
															<td>
																<if condition="$lesson eq $daytime">
																<a style="color:red;" href="{:U('Record/add',array('id'=>$id,'time'=>$lesson))}">添加上课记录</a>
																<else/>
																<a href="javascript:;" style="color:#999;">上课记录</a>
																</if>
															</td>
														</tr>
														</volist>
													</tbody>
												</table>
											</div>
										</div>
										<!-- /.panel-body -->
									</div>
									<!-- /.panel -->
								</div>
								<!-- /.col-lg-12 -->
							</div>
							<!-- /.row -->
						</div>
					</div>
				</div>
			</div>
			<!-- /.col-lg-12 -->
		</div>
		<!-- /.row -->
	</div>
</block>
